home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1989 May & June / rerun-1989-05-06.d64 / animation maker (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  161 lines

  1. 1 ifpeek(52009)<>56thenload"ml",8,1
  2. 2 ifpeek(56)=40then64
  3. 3 poke56334,0:poke1,51:poke251,0:poke252,208:poke253,0:poke254,56:poke53202,0
  4. 4 poke53203,8:sys53160:poke1,55:poke56334,1:sys52000:poke737,1:poke53281,11
  5. 5 poke650,255:print"[147]":poke736,1:goto64
  6. 10 geta$:ifa$=""then10
  7. 11 return
  8. 16 poke52405,4:poke52444,86:sys52000:poke737,1:y=53280
  9. 18 print""spc(8)"pick(2-8) "s$:gosub10
  10. 20 v=val(a$):ifv>1andv<9thena=(17675+(3325*(v-2))):pokey,7:poke53269,1:goto22
  11. 21 goto64
  12. 22 z=a:poke737,1:poke710,166:poke712,138:poke764,4:poke2040,156+(4*v):poke735,1
  13. 26 pokey+7,v:gosub46:iffbthen26
  14. 28 pokey,10:ford=1to250:next
  15. 30 geti$:pokey,10:v=val(i$):gosub46:iffb=0thenpokea,0:goto16
  16. 32 ifvandv<5thenpoke752,v
  17. 34 ifpeek(197)<>64thenpokey,7:goto34
  18. 36 js=peek(56320)and15:ifjs=15then30
  19. 38 k=peek(710):ifk=0thenk=1
  20. 40 pokea,k:pokea+1,peek(711):pokea+2,peek(712):a=a+3
  21. 42 ifa>z+3321thenpokea,0:goto16
  22. 44 goto36
  23. 46 fb=peek(56320)and16:return
  24. 64 clr:restore:poke53269,0:poke53281,11:gosub102
  25. 65 print"[147]animation maker":print"f1[146] background
  26. 70 [153]"f2wait save file":[153]"f3wait movement":[151]52405,24:[151]52444,64
  27. 72 [153]"f4wait char-set":s$[178]"return=menuwait":[153]"f5wait sprites
  28. 74 print"f6[146] load file":print"f7[146] demo mode":gosub325:poke53280,12:gosub600
  29. 85 gosub10:v=asc(a$):ifv>132thenonv-132goto800,16,182,136,106,348,106
  30. 86 goto85
  31. 102 poke53272,21:return
  32. 106 poke56333,127:poke788,49:poke789,234:poke56333,129
  33. 120 zx$="save":zx=1:z=0:ifa$="[139]"thenzx$="load":zx=0:z=10
  34. 121 print""zx$;:n$="":input"-name";n$:ifn$=""then64
  35. 122 poke250,0:poke251,40:poke252,0:poke253,160:open1,8,zx,"0:"+n$:sys53125+z
  36. 123 close1:open15,8,15:input#15,a$,a$:close15:ifa$="ok"then64
  37. 124 print""a$:ford=0to999:next:goto64
  38. 136 sys52000:poke737,1:forx=2to9:poke740+x,1:next:poke710,170
  39. 138 poke712,228:gosub10:goto64
  40. 182 sys52000:gosub102:poke734,0:gosub334:gosub326:dimt(64):poke841,8:poke842,7
  41. 184 poke53270,200:gosub998:goto312
  42. 194 gosub217:gosub10
  43. 197 v=asc(a$):h=q4+64*sp:ifv=95then312
  44. 198 ifv=136then306
  45. 199 ifv=13then64
  46. 202 ifv>132andv<141ande6then216
  47. 203 ifv<49orv>56then194
  48. 204 gosub998:sp=v-49:e6=1:gosub999
  49. 206 xx=1:poke840,peek(53287+sp):print"";:h=q4+64*sp
  50. 207 h%=h/256:l%=h-h%*256:poke251,l%:poke252,h%:sys51750:goto250
  51. 216 onv-132goto250,232,234,306,230,220,238,194
  52. 217 print"[146]"spc(185)"pick(1-8)or(_)[146] "spc(65)"set"se;o$:return
  53. 220 print""spc(185)" copy which? [146]  "spc(65)" pick  (1-8) ":gosub10
  54. 228 a=val(a$):ifathend=q4+64*(a-1):forr=0to63:pokeh+r,peek(d+r):next:goto206
  55. 229 goto194
  56. 230 forr=htoh+63:poker,0:next:goto206
  57. 232 forr=htoh+63:poker,255-peek(r):next:goto206
  58. 234 forr=htoh+62:t(r-h)=peek(r):next:forr=htoh+60step3
  59. 236 forl=0to2:poker+l,t((60+l)-(r-h)):next:next:goto206
  60. 238 forr=htoh+62:t(r-h)=peek(r):next
  61. 240 forr=htoh+60step3:poker,t(r+2-h):poker+2,t(r-h):next
  62. 242 foru=htoh+63:poke828,peek(u):sys51894:pokeu,peek(829):next:goto206
  63. 250 gosub217:print""spc(185)y$:l=1184:m=(q4+(sp*64)):e=7:f=c:b=0
  64. 254 cv=peek(l+54272):gosub700:ifa$=""then276
  65. 260 ifa$="[145]"then280
  66. 261 ifa$="[157]"then284
  67. 262 ifa$=""then292
  68. 264 ifa$="1"thenw=0:cv=0:goto304
  69. 266 ifa$="2"thenw=e2(e):cv=8:goto304
  70. 268 ifa$="3"thenw=e3(e):cv=peek(53287+sp):goto304
  71. 270 ifa$="4"thenw=e4(e):cv=7:goto304
  72. 272 ifa$="[133]"thengosub300:goto194
  73. 274 gosub300:goto197
  74. 276 iff=>c+60then254
  75. 278 u=3:a=40:goto302
  76. 280 iff<=c+2then254
  77. 282 u=-3:a=-40:goto302
  78. 284 ife=7andb=0then254
  79. 286 a=-2:ife<7thene=e+2:u=0:goto302
  80. 288 e=1:b=b-1:u=-1:goto302
  81. 292 ife=1andb=2then254
  82. 294 a=2:ife>1thene=e-2:u=0:goto302
  83. 296 e=7:b=b+1:u=1:goto302
  84. 300 pokel,160:pokel+1,160:pokel+54272,cv:pokel+54273,cv:return
  85. 302 f=f+u:m=m+u:l=l+a:goto254
  86. 304 gosub300:pokem,(peek(m)and(255-(2^e+2^(e-1))))orw:goto254
  87. 306 e6=0:gosub328:gosub325:poke749,1:gosub10:poke749,0:goto314
  88. 312 e6=0:ifxxthengosub328
  89. 313 se=se+1:ifse=5thense=1
  90. 314 e=160+(8*(se-1)):ford=0to7:poke2040+d,e+d:next:q4=10240+(512*(se-1))
  91. 316 ifse=1theno$="(01-08)":e=1:f=2
  92. 318 ifse=2theno$="(09-16)":e=3:f=4
  93. 320 ifse=3theno$="(17-24)":e=5:f=6
  94. 322 ifse=4theno$="(25-32)":e=7:f=8
  95. 323 ford=0to3:poke53287+d,e:next:ford=0to3:poke53291+d,f:next:goto194
  96. 325 ford=1to8:poke53286+d,d:next:return
  97. 326 poke53264,192:forr=0to10step2:poker+53248,32+r*20:next
  98. 327 poke53260,16:poke53262,56:forr=0to14step2:poker+53249,53:next:return
  99. 328 xx=0:print"";:poke251,132:poke252,3:sys51750:gosub998:return
  100. 334 dataedit-entry,clear,reverse,copy,flip^,flip_,animate
  101. 336 print"[147]"spc(240):ford=1to7:reada$:printspc(65)"f"d"[146]"a$:next
  102. 338 printspc(65)s$;:return
  103. 348 o=14336:print"[147]":ford=0to7:print"[179]        [171]":next:sys52000
  104. 364 poke53269,0:gosub416:print"    [221]use+-or f1 f3 to jump[221]f5 rev[221]f7 clr"
  105. 365 geta$:ifpeek(197)=40andc<127thenc=c+1
  106. 366 ifpeek(197)=43andcthenc=c-1
  107. 369 poke1479,c:poke1466,c+128:print"    [157][157][157][157]"c
  108. 370 ford=1to99:ifpeek(197)=64thennext:poke55751,11:poke55738,1:goto374
  109. 371 goto365
  110. 374 poke840,7:poke841,4:poke842,3:print"";:forr=0to7
  111. 378 poke828,peek(r+(o+8*c)):sys51797:printspc(32);:next:print"[157][157][157]"y$spc(7)s$;
  112. 380 l=1349:s=(o+(8*c)):e=7:f=c
  113. 381 cv=peek(l+54272)
  114. 382 gosub700:ifa$=chr$(13)then64
  115. 384 ifa$="[136]"thens=(o+(8*c)):forr=stos+7:poker,0:next:goto364
  116. 385 ifa$="[135]"thens=(o+(8*c)):forr=stos+7:poker,255-peek(r):next:goto364
  117. 387 ifa$="[133]"thenc=40:goto364
  118. 388 ifa$="[134]"thenc=80:goto364
  119. 390 ifa$="+"ora$="-"then365
  120. 391 ifa$=""andf<c+7thenl=l+40:f=f+1:s=s+1:goto381
  121. 392 ifa$="[145]"andf>cthenl=l-40:f=f-1:s=s-1:goto381
  122. 393 ifa$="[157]"ande<7thenl=l-2:e=e+2:goto381
  123. 394 ifa$=""ande>1thenl=l+2:e=e-2:goto381
  124. 395 ifa$="1"thend=e1(e):cv=0:g=1
  125. 396 ifa$="2"thend=e2(e):cv=4:g=1
  126. 398 ifa$="3"thend=e3(e):cv=7:g=1
  127. 400 ifa$="4"thend=e4(e):cv=3:g=1
  128. 402 ifg=1thenpokes,(peek(s)and(255-(2^e+2^(e-1))))ord:gosub300:g=0
  129. 406 goto382
  130. 416 print"[151]"spc(220)"@abcdefghijklmno"spc(24)"pqrstuvwxyz[\]^_
  131. 418 [153][166]20)" !'#$%&'()*+,-./"[166]24)"0123456789:;<=>?
  132. 420 printspc(20)"[192][193][194][195][196][197][198][199][200][201][202][203][204][205][206][207]"spc(24)"[208][209][210][211][212][213][214][215][216][217][218][219][220][221][255][223]
  133. 422 [153][166]20)"closegetnewtab(tofnspc(thennotstep+-*/^and"[166]24)"or>=<sgnintabsusrfrepossqrrndlogexpcossinopen":[142]
  134. 600 e4(7)[178]192:e4(5)[178]48:e4(3)[178]12:e4(1)[178]3:e3(7)[178]128:e3(5)[178]32:e3(3)[178]8:e3(1)[178]2
  135. 604 e2(7)[178]64:e2(5)[178]16:e2(3)[178]4:e2(1)[178]1:y$[178]" # 1-4 colors wait":[142]
  136. 700 [129]r[178]0[164]9:[151]l,81:[151]l[170]1,81:[151]l[170]54272,3:[151]l[170]54273,3:[161]a$
  137. 702 [139]a$[178]""[167][130]:[129]r[178]0[164]9:[141]300:[161]a$:[139]a$[178]""[167][130]:[137]700
  138. 704 [141]300:[142]
  139. 800 [158]52000:[151]53269,0:[151]737,1:c[178]11:o[178]54272:l[178]1024
  140. 802 n[178]0:s[178][194](l):f[178][194](l[170]o)
  141. 804 u[178]128:[139]s[177]127[167]u[178][171]128
  142. 805 [129]r[178]0[164]9:b(0)[178]s[170]u:b(1)[178]s:[151]l,b(n):[161]a$:[151]l[170]o,c
  143. 806 [139]a$[178]""[167][130]:n[178][182](n[171]1):[137]804
  144. 808 v[178][198](a$):[151]l[170]o,f:[151]l,s
  145. 810 [139]v[178]17[175]l[179]1984[167]l[178]l[170]40:[137]802
  146. 812 [139]v[178]29[175]l[179]2023[167]l[178]l[170]1:[137]802
  147. 814 [139]v[178]157[175]l[177]1024[167]l[178]l[171]1:[137]802
  148. 815 [139]v[178]145[175]l[177]1063[167]l[178]l[171]40:[137]802
  149. 817 [139]v[178]133[167]w[178][182](w[171]128)
  150. 818 [139]v[178]134[175]c[179]15[167]c[178]c[170]1
  151. 820 [139]v[178]135[175]c[177]1[167]c[178]c[171]1
  152. 821 [139]v[178]13[167][151]736,1:[138]
  153. 823 [139]v[179]32[176]v[177]127[175]v[179]161[167]802
  154. 824 [139]v[179]64[167]834
  155. 826 [139]v[179]192[167]v[178]v[171]64:[137]834
  156. 828 [139]v[179]224[167]v[178]v[171]128
  157. 834 [151]l,v[170]w:[151]l[170]o,c:[139]l[179]2023[167]l[178]l[170]1
  158. 836 [137]802
  159. 998 [153]"":[129]d[178]1[164]40:[153]"asc";:[130]:[142]
  160. 999 [153]""[166]2[170](5[172]sp))"-":[142]
  161.